home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / The Hacks! / Transport Independent Speech / SpokenSerialApp / SpeechRecognition.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-20  |  19.9 KB  |  474 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        SpeechRecognition.h
  3.  
  4.      Contains:    Apple Speech Recognition Toolbox Interfaces.
  5.  
  6.      Version:    Technology:    PlainTalk 1.5
  7.  
  8.                  Release:    PlainTalk Developer Release
  9.  
  10.      Copyright:    © 1984-1996 by Apple Computer, Inc.
  11.  
  12.                  All rights reserved.
  13.  
  14.      Bugs?:        If you find a problem with this file, send the file and version
  15.                  information (from above) and the problem description to:
  16.  
  17.                      Internet:    apple.bugs@applelink.apple.com
  18.                      AppleLink:    APPLE.BUGS
  19.  
  20. */
  21. #ifndef __SPEECHRECOGNITION__
  22. #define __SPEECHRECOGNITION__
  23.  
  24. #ifndef __MEMORY__
  25. #include <Memory.h>
  26. #endif
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32. #if PRAGMA_IMPORT_SUPPORTED
  33. #pragma import on
  34. #endif
  35.  
  36. #if PRAGMA_ALIGN_SUPPORTED
  37. #pragma options align=mac68k
  38. #endif
  39.  
  40.  
  41. #ifdef REDEFINED
  42. enum {
  43.     gestaltSpeechRecognitionVersion = 'srtb',
  44.     gestaltSpeechRecognitionAttr = 'srta'
  45. };
  46.  
  47. enum {
  48.     gestaltDesktopSpeechRecognition = 1L << 0,
  49.     gestaltTelephoneSpeechRecognition = 1L << 1
  50. };
  51. #endif
  52.  
  53. /* Error Codes [Speech recognition gets -5100 through -5199] */
  54.  
  55. enum {
  56.     kSRNotAvailable                = -5100,                        /* the service requested is not avail or applicable */
  57.     kSRInternalError            = -5101,                        /* a system internal or hardware error condition */
  58.     kSRComponentNotFound        = -5102,                        /* a needed system resource was not located */
  59.     kSROutOfMemory                = -5103,                        /* an out of memory error occurred in the toolbox memory space */
  60.     kSRNotASpeechObject            = -5104,                        /* the object specified is no longer or never was valid */
  61.     kSRBadParameter                = -5105,                        /* an invalid parameter was specified */
  62.     kSRParamOutOfRange            = -5106,                        /* when we say 0-100, don't pass in 101. */
  63.     kSRBadSelector                = -5107,                        /* an unrecognized selector was specified */
  64.     kSRBufferTooSmall            = -5108,                        /* returned from attribute access functions */
  65.     kSRNotARecSystem            = -5109,                        /* the object used was not a SRRecognitionSystem */
  66.     kSRFeedbackNotAvail            = -5110,                        /* there is no feedback window associated with SRRecognizer */
  67.     kSRCantSetProperty            = -5111,                        /* a non-settable property was specified */
  68.     kSRCantGetProperty            = -5112,                        /* a non-gettable property was specified */
  69.     kSRCantSetDuringRecognition    = -5113,                        /* the property can't be set while recognition is in progress -- do before or between utterances. */
  70.     kSRAlreadyListening            = -5114,                        /* in response to SRStartListening */
  71.     kSRNotListeningState        = -5115,                        /* in response to SRStopListening */
  72.     kSRModelMismatch            = -5116,                        /* no acoustical models are avail to match request */
  73.     kSRNoClientLanguageModel    = -5117,                        /* trying to access a non-specified SRLanguageModel */
  74.     kSRNoPendingUtterances        = -5118,                        /* nothing to continue search on */
  75.     kSRRecognitionCanceled        = -5119,                        /* an abort error occurred during search */
  76.     kSRRecognitionDone            = -5120,                        /* search has finished, but nothing was recognized */
  77.     kSROtherRecAlreadyModal        = -5121,                        /* another recognizer is modal at the moment, so can't set this recognizer's kSRBlockModally property right now */
  78.     kSRHasNoSubItems            = -5122,                        /* SRCountItems or related routine was called on an object without subelements -- e.g. a word -- rather than phrase, path, or LM. */
  79.     kSRSubItemNotFound            = -5123,                        /* returned when accessing a non-existent sub item of a container */
  80.     kSRLanguageModelTooBig        = -5124,                        /* Cant build language models so big */
  81.     kSRAlreadyReleased            = -5125,                        /* this object has already been released before */
  82.     kSRAlreadyFinished            = -5126,                        /* the language model can't be finished twice */
  83.     kSRWordNotFound                = -5127,                        /* the spelling couldn't be found in lookup(s) */
  84.     kSRNotFinishedWithRejection    = -5128,                        /* property not found because the LMObj is not finished with rejection */
  85.     kSRExpansionTooDeep            = -5129,                        /* Language model is left recursive or is embedded too many levels */
  86.     kSRTooManyElements            = -5130,                        /* Too many elements added to phrase or path or other langauge model object */
  87.     kSRCantAdd                    = -5131,                        /* Can't add given type of object to the base SRLanguageObject (e.g.in SRAddLanguageObject)    */
  88.     kSRSndInSourceDisconnected    = -5132,                        /* Sound input source is disconnected */
  89.     kSRCantReadLanguageObject    = -5133,                        /* An error while trying to create new Language object from file or pointer -- possibly bad format */
  90.                                                                 /* non-release debugging error codes are included here */
  91.     kSRNotImplementedYet        = -5199                            /* you'd better wait for this feature in a future release */
  92. };
  93.  
  94. /* Type Definitions */
  95. typedef struct OpaqueSRSpeechObject* SRSpeechObject;
  96. typedef SRSpeechObject SRRecognitionSystem;
  97. typedef SRSpeechObject SRRecognizer;
  98. typedef SRSpeechObject SRSpeechSource;
  99. typedef SRSpeechSource SRRecognitionResult;
  100. typedef SRSpeechObject SRLanguageObject;
  101. typedef SRLanguageObject SRLanguageModel;
  102. typedef SRLanguageObject SRPath;
  103. typedef SRLanguageObject SRPhrase;
  104. typedef SRLanguageObject SRWord;
  105. /* between 0 and 100 */
  106. typedef unsigned short SRSpeedSetting;
  107. /* between 0 and 100 */
  108. typedef unsigned short SRRejectionLevel;
  109. /* When an event occurs, the user supplied proc will be called with a pointer    */
  110. /*    to the param passed in and a flag to indicate conditions such                */
  111. /*    as interrupt time or system background time.                                */
  112. struct SRCallBackStruct {
  113.     long                             what;                        /* one of notification flags */
  114.     long                             message;                    /* contains SRRecognitionResult id */
  115.     SRRecognizer                     instance;                    /* ID of recognizer being notified */
  116.     OSErr                             status;                        /* result status of last search */
  117.     short                             flags;                        /* non-zero if occurs during interrupt */
  118.     long                             refCon;                        /* user defined - set from SRCallBackParam */
  119. };
  120. typedef struct SRCallBackStruct SRCallBackStruct;
  121.  
  122. /* Call back procedure definition */
  123. typedef pascal void (*SRCallBackProcPtr)(SRCallBackStruct *param);
  124.  
  125. #if GENERATINGCFM
  126. typedef UniversalProcPtr SRCallBackUPP;
  127. #else
  128. typedef SRCallBackProcPtr SRCallBackUPP;
  129. #endif
  130.  
  131. enum {
  132.     uppSRCallBackProcInfo = kPascalStackBased
  133.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SRCallBackStruct *)))
  134. };
  135.  
  136. #if GENERATINGCFM
  137. #define NewSRCallBackProc(userRoutine)        \
  138.         (SRCallBackUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSRCallBackProcInfo, GetCurrentArchitecture())
  139. #else
  140. #define NewSRCallBackProc(userRoutine)        \
  141.         ((SRCallBackUPP) (userRoutine))
  142. #endif
  143.  
  144. #if GENERATINGCFM
  145. #define CallSRCallBackProc(userRoutine, param)        \
  146.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSRCallBackProcInfo, (param))
  147. #else
  148. #define CallSRCallBackProc(userRoutine, param)        \
  149.         (*(userRoutine))((param))
  150. #endif
  151. struct SRCallBackParam {
  152.     SRCallBackUPP                     callBack;
  153.     long                             refCon;
  154. };
  155. typedef struct SRCallBackParam SRCallBackParam;
  156.  
  157. /* Recognition System Types */
  158.  
  159. enum {
  160.     kSRDefaultRecognitionSystemID = 0
  161. };
  162.  
  163. /* Recognition System Properties */
  164.  
  165. enum {
  166.     kSRFeedbackAndListeningModes = 'fbwn',                        /* short: one of kSRNoFeedbackHasListenModes, kSRHasFeedbackHasListenModes, kSRNoFeedbackNoListenModes */
  167.     kSRRejectedWord                = 'rejq',                        /* the SRWord used to represent a rejection */
  168.     kSRCleanupOnClientExit        = 'clup'                        /* Boolean: Default is true. The rec system and everything it owns is disposed when the client application quits */
  169. };
  170.  
  171.  
  172. enum {
  173.     kSRNoFeedbackNoListenModes    = 0,                            /* next allocated recognizer has no feedback window and doesn't use listening modes    */
  174.     kSRHasFeedbackHasListenModes = 1,                            /* next allocated recognizer has feedback window and uses listening modes             */
  175.     kSRNoFeedbackHasListenModes    = 2                                /* next allocated recognizer has no feedback window but does use listening modes     */
  176. };
  177.  
  178. /* Speech Source Types */
  179.  
  180. enum {
  181.     kSRDefaultSpeechSource        = 0,
  182.     kSRLiveDesktopSpeechSource    = 'dklv',                        /* live desktop sound input */
  183.     kSRCanned22kHzSpeechSource    = 'ca22'                        /* AIFF file based 16 bit, 22.050 KHz sound input */
  184. };
  185.  
  186. /* Notification via Apple Event or Callback */
  187. /* Notification Flags */
  188.  
  189. enum {
  190.     kSRNotifyRecognitionBeginning = 1L << 0,                    /* recognition can begin. client must now call SRContinueRecognition or SRCancelRecognition */
  191.     kSRNotifyRecognitionDone    = 1L << 1                        /* recognition has terminated. result (if any) is available. */
  192. };
  193.  
  194. /* Apple Event selectors */
  195. /* AppleEvent message class  */
  196.  
  197. enum {
  198.     kAESpeechSuite                = 'sprc'
  199. };
  200.  
  201. /* AppleEvent message event ids */
  202.  
  203. enum {
  204.     kAESpeechDone                = 'srsd',
  205.     kAESpeechDetected            = 'srbd'
  206. };
  207.  
  208. /* AppleEvent Parameter ids */
  209.  
  210. enum {
  211.     keySRRecognizer                = 'krec',
  212.     keySRSpeechResult            = 'kspr',
  213.     keySRSpeechStatus            = 'ksst'
  214. };
  215.  
  216. /* AppleEvent Parameter types */
  217.  
  218. enum {
  219.     typeSRRecognizer            = 'trec',
  220.     typeSRSpeechResult            = 'tspr'
  221. };
  222.  
  223. /* SRRecognizer Properties */
  224.  
  225. enum {
  226.     kSRNotificationParam        = 'noti',                        /* see notification flags below */
  227.     kSRCallBackParam            = 'call',                        /* type SRCallBackParam */
  228.     kSRSearchStatusParam        = 'stat',                        /* see status flags below */
  229.     kSRAutoFinishingParam        = 'afin',                        /* automatic finishing applied on LM for search */
  230.     kSRForegroundOnly            = 'fgon',                        /* Boolean. Default is true. If true, client recognizer only active when in foreground.    */
  231.     kSRBlockBackground            = 'blbg',                        /* Boolean. Default is false. If true, when client recognizer in foreground, rest of LMs are inactive.    */
  232.     kSRBlockModally                = 'blmd',                        /* Boolean. Default is false. When true, this client's LM is only active LM; all other LMs are inactive. Be nice, don't be modal for long periods! */
  233.     kSRWantsResultTextDrawn        = 'txfb',                        /* Boolean. Default is true. If true, search results are posted to Feedback window */
  234.     kSRWantsAutoFBGestures        = 'dfbr',                        /* Boolean. Default is true. If true, client needn't call SRProcessBegin/End to get default feedback behavior */
  235.     kSRSoundInVolume            = 'volu',                        /* short in [0..100] log scaled sound input power. Can't set this property */
  236.     kSRReadAudioFSSpec            = 'aurd',                        /* *FSSpec. Specify FSSpec where raw audio is to be read (AIFF format) using kSRCanned22kHzSpeechSource. Reads until EOF */
  237.     kSRCancelOnSoundOut            = 'caso',                        /* Boolean: Default is true.  If any sound is played out during utterance, recognition is aborted. */
  238.     kSRSpeedVsAccuracyParam        = 'sped'                        /* SRSpeedSetting between 0 and 100 */
  239. };
  240.  
  241. /* 0 means more accurate but slower. */
  242. /* 100 means (much) less accurate but faster. */
  243.  
  244. enum {
  245.     kSRUseToggleListen            = 0,                            /* listen key modes */
  246.     kSRUsePushToTalk            = 1
  247. };
  248.  
  249.  
  250. enum {
  251.     kSRListenKeyMode            = 'lkmd',                        /* short: either kSRUseToggleListen or kSRUsePushToTalk */
  252.     kSRListenKeyCombo            = 'lkey',                        /* short: Push-To-Talk key combination; high byte is high byte of event->modifiers, the low byte is the keycode from event->message */
  253.     kSRListenKeyName            = 'lnam',                        /* Str63: string representing ListenKeyCombo */
  254.     kSRKeyWord                    = 'kwrd',                        /* Str255: keyword preceding spoken commands in kSRUseToggleListen mode */
  255.     kSRKeyExpected                = 'kexp'                        /* Boolean: Must the PTT key be depressed or the key word spoken before recognition can occur? */
  256. };
  257.  
  258. /* Operational Status Flags */
  259.  
  260. enum {
  261.     kSRIdleRecognizer            = 1L << 0,                        /* engine is not active */
  262.     kSRSearchInProgress            = 1L << 1,                        /* search is in progress */
  263.     kSRSearchWaitForAllClients    = 1L << 2,                        /* search is suspended waiting on all clients' input */
  264.     kSRMustCancelSearch            = 1L << 3,                        /* something has occurred (sound played, non-speech detected) requiring the search to abort */
  265.     kSRPendingSearch            = 1L << 4                        /* we're about to start searching */
  266. };
  267.  
  268. /* Recognition Result Properties */
  269.  
  270. enum {
  271.     kSRTEXTFormat                = 'TEXT',                        /* raw text in user supplied memory */
  272.     kSRPhraseFormat                = 'lmph',                        /* SRPhrase containing result words */
  273.     kSRPathFormat                = 'lmpt',                        /* SRPath containing result phrases or words */
  274.     kSRLanguageModelFormat        = 'lmfm'                        /* top level SRLanguageModel for post parse */
  275. };
  276.  
  277. /* SRLanguageObject Family Properties */
  278.  
  279. enum {
  280.     kSRSpelling                    = 'spel',                        /* spelling of a SRWord or SRPhrase or SRPath, or name of a SRLanguageModel */
  281.     kSRLMObjType                = 'lmtp',                        /* Returns one of SRLanguageObject Types listed below */
  282.     kSRRefCon                    = 'refc',                        /* 4 bytes of user storage */
  283.     kSROptional                    = 'optl',                        /* Boolean -- true if SRLanguageObject is optional    */
  284.     kSREnabled                    = 'enbl',                        /* Boolean -- true if SRLanguageObject enabled */
  285.     kSRRepeatable                = 'rptb',                        /* Boolean -- true if SRLanguageObject is repeatable */
  286.     kSRRejectable                = 'rjbl',                        /* Boolean -- true if SRLanguageObject is rejectable (Recognition System's kSRRejectedWord */
  287.                                                                 /*        object can be returned in place of SRLanguageObject with this property)    */
  288.     kSRRejectionLevel            = 'rjct'                        /* SRRejectionLevel between 0 and 100 */
  289. };
  290.  
  291. /* LM Object Types -- returned as kSRLMObjType property of language model objects */
  292.  
  293. enum {
  294.     kSRLanguageModelType        = 'lmob',                        /* SRLanguageModel */
  295.     kSRPathType                    = 'path',                        /* SRPath */
  296.     kSRPhraseType                = 'phra',                        /* SRPhrase */
  297.     kSRWordType                    = 'word'                        /* SRWord */
  298. };
  299.  
  300. /* a normal and reasonable rejection level */
  301.  
  302. enum {
  303.     kSRDefaultRejectionLevel    = 50
  304. };
  305.  
  306. /********************************************************************************/
  307. /*                        NOTES ON USING THE API                                    */
  308. /*                                                                                */
  309. /*        All operations (with the exception of SRGetRecognitionSystem) are        */
  310. /*        directed toward an object allocated or begot from New, Get and Read        */
  311. /*        type calls.                                                                */
  312. /*                                                                                */
  313. /*        There is a simple rule in dealing with allocation and disposal:            */
  314. /*                                                                                */
  315. /*        *    all toolbox allocations are obtained from a SRRecognitionSystem        */
  316. /*                                                                                */
  317. /*        *    if you obtain an object via New or Get, then you own a reference     */
  318. /*            to that object and it must be released via SRReleaseObject when        */
  319. /*            you no longer need it                                                */
  320. /*                                                                                */
  321. /*        *    when you receive a SRRecognitionResult object via AppleEvent or        */
  322. /*            callback, it has essentially been created on your behalf and so        */
  323. /*            you are responsible for releasing it as above                        */
  324. /*                                                                                */
  325. /*        *    when you close a SRRecognitionSystem, all remaining objects which        */
  326. /*            were allocated with it will be forcefully released and any            */
  327. /*            remaining references to those objects will be invalid.                */
  328. /*                                                                                */
  329. /*        This translates into a very simple guideline:                            */
  330. /*            If you allocate it or have it allocated for you, you must release    */
  331. /*            it.  If you are only peeking at it, then don't release it.            */
  332. /*                                                                                */
  333. /********************************************************************************/
  334. /* Opening and Closing of the SRRecognitionSystem */
  335. extern pascal OSErr SROpenRecognitionSystem(SRRecognitionSystem *system, OSType systemID)
  336.  THREEWORDINLINE(0x303C, 0x0400, 0xAA56);
  337.  
  338. extern pascal OSErr SRCloseRecognitionSystem(SRRecognitionSystem system)
  339.  THREEWORDINLINE(0x303C, 0x0201, 0xAA56);
  340.  
  341. /* Accessing Properties of any Speech Object */
  342. extern pascal OSErr SRSetProperty(SRSpeechObject srObject, OSType selector, const void *property, Size propertyLen)
  343.  THREEWORDINLINE(0x303C, 0x0802, 0xAA56);
  344.  
  345. extern pascal OSErr SRGetProperty(SRSpeechObject srObject, OSType selector, void *property, Size *propertyLen)
  346.  THREEWORDINLINE(0x303C, 0x0803, 0xAA56);
  347.  
  348. /* Any object obtained via New or Get type calls must be released */
  349. extern pascal OSErr SRReleaseObject(SRSpeechObject srObject)
  350.  THREEWORDINLINE(0x303C, 0x0204, 0xAA56);
  351.  
  352. extern pascal OSErr SRGetReference(SRSpeechObject srObject, SRSpeechObject *newObjectRef)
  353.  THREEWORDINLINE(0x303C, 0x0425, 0xAA56);
  354.  
  355. /* SRRecognizer Instance Functions */
  356. extern pascal OSErr SRNewRecognizer(SRRecognitionSystem system, SRRecognizer *recognizer, OSType sourceID)
  357.  THREEWORDINLINE(0x303C, 0x060A, 0xAA56);
  358.  
  359. extern pascal OSErr SRStartListening(SRRecognizer recognizer)
  360.  THREEWORDINLINE(0x303C, 0x020C, 0xAA56);
  361.  
  362. extern pascal OSErr SRStopListening(SRRecognizer recognizer)
  363.  THREEWORDINLINE(0x303C, 0x020D, 0xAA56);
  364.  
  365. extern pascal OSErr SRSetLanguageModel(SRRecognizer recognizer, SRLanguageModel languageModel)
  366.  THREEWORDINLINE(0x303C, 0x040E, 0xAA56);
  367.  
  368. extern pascal OSErr SRGetLanguageModel(SRRecognizer recognizer, SRLanguageModel *languageModel)
  369.  THREEWORDINLINE(0x303C, 0x040F, 0xAA56);
  370.  
  371. extern pascal OSErr SRContinueRecognition(SRRecognizer recognizer)
  372.  THREEWORDINLINE(0x303C, 0x0210, 0xAA56);
  373.  
  374. extern pascal OSErr SRCancelRecognition(SRRecognizer recognizer)
  375.  THREEWORDINLINE(0x303C, 0x0211, 0xAA56);
  376.  
  377. extern pascal OSErr SRIdle(void )
  378.  THREEWORDINLINE(0x303C, 0x0028, 0xAA56);
  379.  
  380. /* Language Model Building and Manipulation Functions */
  381. extern pascal OSErr SRNewLanguageModel(SRRecognitionSystem system, SRLanguageModel *model, const void *name, Size nameLength)
  382.  THREEWORDINLINE(0x303C, 0x0812, 0xAA56);
  383.  
  384. extern pascal OSErr SRNewPath(SRRecognitionSystem system, SRPath *path)
  385.  THREEWORDINLINE(0x303C, 0x0413, 0xAA56);
  386.  
  387. extern pascal OSErr SRNewPhrase(SRRecognitionSystem system, SRPhrase *phrase, const void *text, Size textLength)
  388.  THREEWORDINLINE(0x303C, 0x0814, 0xAA56);
  389.  
  390. extern pascal OSErr SRNewWord(SRRecognitionSystem system, SRWord *word, const void *text, Size textLength)
  391.  THREEWORDINLINE(0x303C, 0x0815, 0xAA56);
  392.  
  393. /* Operations on any object of the SRLanguageObject family */
  394. extern pascal OSErr SRPutLanguageObjectIntoHandle(SRLanguageObject languageObject, Handle lobjHandle)
  395.  THREEWORDINLINE(0x303C, 0x0416, 0xAA56);
  396.  
  397. extern pascal OSErr SRPutLanguageObjectIntoDataFile(SRLanguageObject languageObject, short fRefNum)
  398.  THREEWORDINLINE(0x303C, 0x0328, 0xAA56);
  399.  
  400. extern pascal OSErr SRNewLanguageObjectFromHandle(SRRecognitionSystem system, SRLanguageObject *languageObject, Handle lObjHandle)
  401.  THREEWORDINLINE(0x303C, 0x0417, 0xAA56);
  402.  
  403. extern pascal OSErr SRNewLanguageObjectFromDataFile(SRRecognitionSystem system, SRLanguageObject *languageObject, short fRefNum)
  404.  THREEWORDINLINE(0x303C, 0x0427, 0xAA56);
  405.  
  406. extern pascal OSErr SREmptyLanguageObject(SRLanguageObject languageObject)
  407.  THREEWORDINLINE(0x303C, 0x0218, 0xAA56);
  408.  
  409. extern pascal OSErr SRChangeLanguageObject(SRLanguageObject languageObject, const void *text, Size textLength)
  410.  THREEWORDINLINE(0x303C, 0x0619, 0xAA56);
  411.  
  412. extern pascal OSErr SRAddLanguageObject(SRLanguageObject base, SRLanguageObject addon)
  413.  THREEWORDINLINE(0x303C, 0x041A, 0xAA56);
  414.  
  415. extern pascal OSErr SRAddText(SRLanguageObject base, const void *text, Size textLength, long refCon)
  416.  THREEWORDINLINE(0x303C, 0x081B, 0xAA56);
  417.  
  418. extern pascal OSErr SRRemoveLanguageObject(SRLanguageObject base, SRLanguageObject toRemove)
  419.  THREEWORDINLINE(0x303C, 0x041C, 0xAA56);
  420.  
  421. /* Traversing SRRecognitionResults or SRLanguageObjects */
  422. extern pascal OSErr SRCountItems(SRSpeechObject container, long *count)
  423.  THREEWORDINLINE(0x303C, 0x0405, 0xAA56);
  424.  
  425. extern pascal OSErr SRGetIndexedItem(SRSpeechObject container, SRSpeechObject *item, long index)
  426.  THREEWORDINLINE(0x303C, 0x0606, 0xAA56);
  427.  
  428. extern pascal OSErr SRSetIndexedItem(SRSpeechObject container, SRSpeechObject item, long index)
  429.  THREEWORDINLINE(0x303C, 0x0607, 0xAA56);
  430.  
  431. extern pascal OSErr SRRemoveIndexedItem(SRSpeechObject container, long index)
  432.  THREEWORDINLINE(0x303C, 0x0408, 0xAA56);
  433.  
  434. /* Utilizing the System Feedback Window */
  435. extern pascal OSErr SRDrawText(SRRecognizer recognizer, const void *dispText, Size dispLength)
  436.  THREEWORDINLINE(0x303C, 0x0621, 0xAA56);
  437.  
  438. extern pascal OSErr SRDrawRecognizedText(SRRecognizer recognizer, const void *dispText, Size dispLength)
  439.  THREEWORDINLINE(0x303C, 0x0622, 0xAA56);
  440.  
  441. extern pascal OSErr SRSpeakText(SRRecognizer recognizer, const void *speakText, Size speakLength)
  442.  THREEWORDINLINE(0x303C, 0x0620, 0xAA56);
  443.  
  444. extern pascal OSErr SRSpeakAndDrawText(SRRecognizer recognizer, const void *text, Size textLength)
  445.  THREEWORDINLINE(0x303C, 0x061F, 0xAA56);
  446.  
  447. extern pascal OSErr SRStopSpeech(SRRecognizer recognizer)
  448.  THREEWORDINLINE(0x303C, 0x0223, 0xAA56);
  449.  
  450. extern pascal Boolean SRSpeechBusy(SRRecognizer recognizer)
  451.  THREEWORDINLINE(0x303C, 0x0224, 0xAA56);
  452.  
  453. extern pascal OSErr SRProcessBegin(SRRecognizer recognizer, Boolean failed)
  454.  THREEWORDINLINE(0x303C, 0x031D, 0xAA56);
  455.  
  456. extern pascal OSErr SRProcessEnd(SRRecognizer recognizer, Boolean failed)
  457.  THREEWORDINLINE(0x303C, 0x031E, 0xAA56);
  458.  
  459.  
  460. #if PRAGMA_ALIGN_SUPPORTED
  461. #pragma options align=reset
  462. #endif
  463.  
  464. #if PRAGMA_IMPORT_SUPPORTED
  465. #pragma import off
  466. #endif
  467.  
  468. #ifdef __cplusplus
  469. }
  470. #endif
  471.  
  472. #endif /* __SPEECHRECOGNITION__ */
  473.  
  474.